package singleton;

public class SingletonPatternDemo {
    public static void main(String[] args) {
        //错误，因为SingleObkect（）是不可见的
//        SingleObject object=new SingleObject();

        //获取唯一可用的对象
        SingleObject object=SingleObject.getInstance();
        //显示消息
        object.showMessage();
    }
}
